package cn.xorange.commons.security.constants;


import cn.xorange.commons.utils.lang.StringUtils;

import javax.servlet.http.HttpServletRequest;

/**
 * @author : yangjian
 * @date : 2021/12/12
 */
public class SecurityCacheKeys {

    public static String webAttackCatchKey(String ip, HttpServletRequest request){
        return StringUtils.format("{}:{}:{}", CacheConstants.WEB_ASK_LIST_KEY, ip, request.getRequestURI());
    }

    public static String loginErrKey(String tenantId ,String loginName){
        return StringUtils.format("{}:{}:{}",CacheConstants.LOGIN_ERR, tenantId, loginName);
    }

}
